import React, { useState,useEffect } from 'react';
import { StyleSheet, Text, View ,Image} from 'react-native';
import {scaleSizeH,scaleSizeW} from '../util/ScreenUtil.js'
export default function Welcome(props) {
  // 声明一个新的叫做 “count” 的 state 变量
  const [ ] = useState(0);
  
  useEffect(() => {
    setTimeout(()=>{props.navigation.replace('Maininter')},2000)
}, []);
  return (
    <View style={styles.container}>
        <Image resizeMode="stretch" style={styles.img} source={require('../resource/imgs/welcome.jpg')} />
      </View>
  );
}
Welcome.navigationOptions = {
  headerShown:false 
}
const styles = StyleSheet.create({
    container: {
     flex: 1,
    },
    img:{
        width:scaleSizeW(750),
        height:scaleSizeH(1500)
    }
  });